package com.example.fist.personRepository;

import com.example.fist.entity.AdminEntity;
import com.example.fist.entity.CodeEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface CodeJpaRepository  extends JpaRepository<CodeEntity, Integer> {

    @Query(nativeQuery = true, value = "SELECT * FROM code WHERE  ad_id=:id and code=:code")
    CodeEntity getCode(@Param("id") int id,String code) ;

}
